import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/vehicle/list',
    method: 'get',
    params: query
  })
}

export function getTotal(data) {
  return request({
    url: '/vehicle/query/total',
    method: 'get',
    data
  })
}

export function searchList(data) {
  console.log(data)
  return request({
    url: '/vehicle/query',
    method: 'get',
    params: data
  })
}

export function stopCar(id) {
  console.log(id)
  return request({
    url: '/vehicle/stop/' + id,
    method: 'put',
    params: { id }
  })
}
export function backCar(id) {
  console.log(id)
  return request({
    url: '/vehicle/back/' + id,
    method: 'put',
    params: { id }
  })
}
